{{- define "title" }}Timer - {{ .Site.Title }}{{ end -}}

{{- define "content" -}}
  <article class="post">
    <div class="post-content">
      {{ .Content }}
    </div>
  </article>
  <aside class="anniversary">
    <div id="memory" class="memory-block"></div>
  </aside>

  {{ if not .Site.Params.memory.enable -}}
    {{ $memory := resources.Get "js/memory.js" }}
    {{ $js := slice $memory | resources.Concat "js/memory.js" | minify | fingerprint }}
    <script type="text/javascript" src="{{ $js.RelPermalink }}"></script>
  {{- end }}

  <script type="text/javascript">
    let anniversary = new Memory({
      el: '#memory',
      tag: 'i',
      start: '{{ .Site.Params.memory.start }}',
      template: '<section><span>猪头和丫头在一起</span><h2>DD<span>天</span></h2><span>我们YYYY周年啦！</span></section>',
      delay: '{{ .Site.Params.memory.delay }}',
    });
  </script>
{{- end -}}